//
//  ViewController.m
//  RSChooseTimeCase
//
//  Created by thinkjoy on 16/9/9.
//  Copyright © 2016年 Thinkjoy_RS. All rights reserved.
//

#import "ViewController.h"
#import "chooseeTimeCase1/ChooseUseTimeCase.h"
#import "chooseTimeCase2/RSChooseTimePickerView.h"
#import "chooseTimeCase3/RSChooseTimePickerViewTwo.h"
@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIButton *buttOne;
- (IBAction)clickButtOne:(UIButton *)sender;
@property (weak, nonatomic) IBOutlet UILabel *labelOne;

@property (weak, nonatomic) IBOutlet UIButton *buttTwo;
- (IBAction)clickButtTwo:(UIButton *)sender;
@property (weak, nonatomic) IBOutlet UILabel *labelTwo;

@property (weak, nonatomic) IBOutlet UIButton *buttThree;
- (IBAction)clickButtThree:(UIButton *)sender;
@property (weak, nonatomic) IBOutlet UILabel *labelThree;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)clickButtOne:(UIButton *)sender
{
    NSLog(@"点击了1");
    ChooseUseTimeCase   * timeCase  =   [[ChooseUseTimeCase alloc]init];
    [timeCase setChooseTimeViewBlock:^(NSString * timeStr) {
        NSLog(@"%@",timeStr);
        self.labelOne.text  =   timeStr;
    }];
}
- (IBAction)clickButtTwo:(UIButton *)sender
{
    NSLog(@"点击了2");
    RSChooseTimePickerView  * chooseTimePickerView  =   [[RSChooseTimePickerView alloc]init];
    [chooseTimePickerView setChooseTimeViewBlock:^(NSString * timeStr) {
        NSLog(@"%@",timeStr);
        self.labelTwo.text  =   timeStr;
    }];
}
- (IBAction)clickButtThree:(UIButton *)sender
{
    NSLog(@"点击了3");
    RSChooseTimePickerViewTwo * chooseTwo   =   [[RSChooseTimePickerViewTwo alloc]init];
    [chooseTwo setChooseTimeViewBlock:^(NSString * timeStr) {
        NSLog(@"%@",timeStr);
        self.labelThree.text  =   timeStr;
    }];
}
@end
